<template>
 <el-container>
  <el-header>
    <button @click="loginout">退出</button>
  </el-header>
  <el-container>
    <myaside></myaside>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</el-container>
</template>

<script>
import myaside from '../components/myaside.vue'
  export default {
  components: { myaside },
    methods: {
      loginout() {
        // 删除本地得token
        localStorage.removeItem('token')
        // 跳转到登录页
        this.$router.push('/login')
      }
    },
  }
</script>

<style  scoped>
.el-container {
    height: 100%;
  }
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
   
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
   
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    
  }
  
 

</style>